Skip to content

Cherry-picks to fix builds with changes to build images#7847

Merged
damyanp merged 7 commits into
release-1.8.2505from
user/damyanp/fix-1.8.2505-builds
Oct 28, 2025
Merged

Cherry-picks to fix builds with changes to build images#7847
damyanp merged 7 commits into
release-1.8.2505from
user/damyanp/fix-1.8.2505-builds

Conversation

@damyanp
Copy link
Copy Markdown
Member

@damyanp damyanp commented Oct 27, 2025

Since we last built this branch there have been various changes to the compilers and build images we use that require code updates to allow this to continue building.

Workaround broken ARM64X / MSVC_BUILD_AS_X builds (#7827)

(cherry picked from commit ea7e910)

Use WARP from nuget by default (#7427)

(cherry picked from commit 33dd542)
Manually moved changes from HlslExecTestUtils.h into ExecutionTest.cpp

Add hctbuild.cmd parameter to specify the nuget config file (#7785)

(cherry picked from commit 06dcb00)

Change type of DiagnosticHandlerTy

(cherry picked from commit b05a11a)

Type safe version of MachinePassRegistry

(cherry picked from commit 4ddee81)

Currently, when internal pipelines build for ARM64X we use the older
experimental `MSVC_BUILD_AS_X` feature. The latest VS release has
regressed this functionality, resulting in the import libs for the ARM64
and ARM64X DLLs being written to the same location.

Remember that ARM64X binaries are fat binaries containing both ARM64 and
ARM64EC code. When building for ARM64 with MSVC_BUILD_AS_X, the Visual
Studio cmake generator actually generates vcxproj files that build ARM64
and ARM64EC (with the ARM64EC version being the one that becomes the
combined ARM64X binary. The generated project knows how to ensure that
the ARM64 DLL is built to one location and the ARM64X one goes into the
destination specified in the cmake scripts. However, the import
libraries end up being configured to go into the same location,
resulting in a race condition.

Our cmake scripts have no knowledge of these two platforms, and so
there's no direct way to address this. This workaround makes it so that
when building in this mode the import libraries are written to a
location containing `$(PLATFORM)`. This is a msbuild variable that's
evaluated at build time.

This is a short-term fix that allows us to unblock our internal
pipelines. Longer-term we should move to using the [documented ARM64X
approach](https://learn.microsoft.com/en-us/windows/arm/arm64x-build#building-an-arm64x-dll-with-cmake),
at which point this change should be reverted.

(cherry picked from commit ea7e910)
Previously using WARP from nuget was something that had to be opted in
to. This change makes it the default behvior.

This allows some simplifications. The nuget package is installed at
configure time. If the user wants to override the nuget installation
behavior then they can pass in extra parameters, rather than having an
alternative mechanism for describing which package to use.

The actual DLL to load is specified through a TAEF parameter and
specifies the full path to the DLL.

(cherry picked from commit 33dd542)

Manually moved changes from HlslExecTestUtils.h into ExecutionTest.cpp
This change allows us to control which nuget.config is used.

This is to allow internal builds to override the nuget feed that's used.

(cherry picked from commit 06dcb00)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 27, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

github-actions Bot and others added 3 commits October 27, 2025 18:22
Newer versions of clang include -Wcast-function-type-mismatch in
-Wextra, which triggers a warning when we cast between function pointers
that differ between a pointer and a reference in an argument. Resolve
this by making the types consistent.

This change is equivalent to llvm/llvm-project#86504 from upstream.

(cherry picked from commit b05a11a)
Previous version used type erasure through a `void* (*)()` pointer,
which triggered gcc warning and implied a lot of reinterpret_cast.

This version should make it harder to hit ourselves in the foot.

Differential revision: https://reviews.llvm.org/D54203

(cherry picked from commit 86f8b70f1b7c3f92266197d580f6d86414650997)
(cherry picked from commit 4ddee81)
@damyanp damyanp merged commit 6b8f678 into release-1.8.2505 Oct 28, 2025
14 checks passed
@damyanp damyanp deleted the user/damyanp/fix-1.8.2505-builds branch October 28, 2025 16:07
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants